# noinspection SpellCheckingInspectionForFile
# noinspection HttpUrlsUsageForFile

##开启事务
BEGIN;
SET NAMES utf8mb4;

-- ------------------------> 正式开始写 SQL 语句 <------------------------
-- ----------------------------
-- Table structure for ban_address
-- ----------------------------
DROP TABLE IF EXISTS `ban_address`;
CREATE TABLE `ban_address`
(
    `auto_id`     bigint                                                       NOT NULL AUTO_INCREMENT,
    `id`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据ID',
    `address`     varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '访问IP',
    `is_deleted`  tinyint(1)                                                   NULL DEFAULT NULL COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time` datetime                                                     NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                     NULL DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `address_index` (`address` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 2
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '禁止访问IP'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of ban_address
-- ----------------------------

-- ----------------------------
-- Table structure for dic_info
-- ----------------------------
DROP TABLE IF EXISTS `dic_info`;
CREATE TABLE `dic_info`
(
    `auto_id`     bigint                                                       NOT NULL AUTO_INCREMENT,
    `id`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据ID',
    `parent_id`   varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '-1' COMMENT '父级ID',
    `dic_name`    varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '字典名称',
    `dic_value`   int                                                          NULL     DEFAULT NULL COMMENT '字典值',
    `dic_sort`    int                                                          NULL     DEFAULT NULL COMMENT '字典顺序',
    `is_show`     tinyint(1)                                                   NOT NULL DEFAULT 1 COMMENT '是否显示',
    `predefined`  tinyint(1)                                                   NULL     DEFAULT 0 COMMENT '预定义(true-是, false-否)',
    `user_id`     varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '字典用户ID',
    `is_deleted`  tinyint(1)                                                   NULL     DEFAULT NULL COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time` datetime                                                     NULL     DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                     NULL     DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `parent_id_index` (`parent_id` ASC) USING BTREE,
    INDEX `user_id_index` (`user_id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 11
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '数据字典'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of dic_info
-- ----------------------------
INSERT INTO `dic_info`
VALUES (1, '1777877567770038274', '-1', '共享关系', 1000, 1, 1, 1, NULL, 0, '2024-04-10 09:53:38',
        '2024-04-10 09:53:38');
INSERT INTO `dic_info`
VALUES (3, '1868907376092954626', '-1', '日记类型', 2000, 2, 1, 1, NULL, 0, '2024-12-17 14:33:36',
        '2024-12-17 14:33:36');

-- ----------------------------
-- Table structure for email_info
-- ----------------------------
DROP TABLE IF EXISTS `email_info`;
CREATE TABLE `email_info`
(
    `auto_id`       bigint                                                        NOT NULL AUTO_INCREMENT,
    `id`            varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '数据ID',
    `receive_add`   varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT '接收地址',
    `email_title`   varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮件标题',
    `email_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci         NULL COMMENT '邮件内容',
    `send_time`     datetime                                                      NOT NULL COMMENT '发送时间',
    `send_user_id`  varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT '发送用户',
    `template_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '模版code',
    `send_error`    tinyint(1)                                                    NULL DEFAULT NULL COMMENT '消息发送异常：1(异常) 0(正常)',
    `error_msg`     text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci         NULL COMMENT '错误内容',
    `is_deleted`    tinyint(1)                                                    NOT NULL COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time`   datetime                                                      NULL DEFAULT NULL COMMENT '创建时间',
    `update_time`   datetime                                                      NULL DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `template_code_index` (`template_code` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE,
    INDEX `receive_add_index` (`receive_add` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 1
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '邮件发送记录'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of email_info
-- ----------------------------

-- ----------------------------
-- Table structure for email_template
-- ----------------------------
DROP TABLE IF EXISTS `email_template`;
CREATE TABLE `email_template`
(
    `auto_id`          bigint                                                        NOT NULL AUTO_INCREMENT,
    `id`               varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '数据ID',
    `template_code`    varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '模版code',
    `template_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci         NULL COMMENT '邮件内容模版',
    `msg_title`        varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '消息标题',
    `is_deleted`       tinyint(1)                                                    NOT NULL COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time`      datetime                                                      NULL DEFAULT NULL COMMENT '创建时间',
    `update_time`      datetime                                                      NULL DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `template_code_index` (`template_code` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 5
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '邮件模版'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of email_template
-- ----------------------------
INSERT INTO `email_template`
VALUES (1, '1570692262317039633', 'TEST_00000001', '您好, #{#receiveName}: <br>如该对邮件的打扰, 我们深表歉意, 请原谅。',
        'Micro', 0, '2022-09-20 22:11:22', '2022-09-20 22:11:24');
INSERT INTO `email_template`
VALUES (2, '1570692262317039636', 'UNKNOWN_WE_CHAT_MSG',
        '您好, #{#receiveName}:<br/>接收到未知微信消息,消息内容为:<pre><code>#{#msgString}</code><br/>需要您及时处理。</pre>',
        '未知微信消息提醒', 0, '2023-03-09 17:09:56', '2023-03-09 17:09:56');
INSERT INTO `email_template`
VALUES (3, '1570692262317039637', 'RANDOM_PWD_01',
        '您好, #{#receiveName}: <br/>重置密码成功, 您的新密码为: <pre><code>#{#pwd}</code></pre>', '重置密码', 0,
        '2022-09-27 17:28:31', '2022-09-27 17:28:31');
INSERT INTO `email_template`
VALUES (4, '1572951144690454533', 'SPIDER_ERROR_MSG',
        '您好, #{#receiveName}: <br/>&emsp;&emsp;Micro&emsp;系统&emsp; #{beanName} &emsp;数据获取组建于&emsp;#{#errorTime}&emsp;发生异常,错误信息为:<br/>&emsp;&emsp;&emsp;&emsp;<code>#{#errorMsg}</code><br/>&emsp;&emsp;请尽快登录服务器查看详情并处理。</pre>。<br/>感谢您的使用,如有打扰, 请忽略此邮件。',
        '数据抓取错误', 0, '2023-05-16 03:59:08', '2023-05-16 03:59:08');

-- ----------------------------
-- Table structure for file_upload
-- ----------------------------
DROP TABLE IF EXISTS `file_upload`;
CREATE TABLE `file_upload`
(
    `auto_id`          bigint                                                         NOT NULL AUTO_INCREMENT,
    `id`               varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci   NOT NULL COMMENT '数据主键ID',
    `old_file_name`    varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '原文件名',
    `new_file_name`    varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL     DEFAULT NULL COMMENT '新文件名',
    `upload_time`      datetime                                                       NULL     DEFAULT NULL COMMENT '文件上传时间',
    `upload_user_id`   varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci   NULL     DEFAULT NULL COMMENT '文件上传用户ID',
    `upload_user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci   NULL     DEFAULT NULL COMMENT '文件上传用户名',
    `bucket_name`      varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL     DEFAULT NULL COMMENT 'Minio存储文件桶',
    `download_url`     varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL     DEFAULT NULL COMMENT '文件下载地址',
    `is_deleted`       tinyint(1)                                                     NOT NULL DEFAULT 0 COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time`      datetime                                                       NULL     DEFAULT NULL COMMENT '创建时间',
    `update_time`      datetime                                                       NULL     DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE,
    INDEX `upload_time_index` (`upload_time` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 918
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '文件上传记录表'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of file_upload
-- ----------------------------

-- ----------------------------
-- Table structure for ip_query_info
-- ----------------------------
DROP TABLE IF EXISTS `ip_query_info`;
CREATE TABLE `ip_query_info`
(
    `auto_id`     bigint                                                        NOT NULL AUTO_INCREMENT,
    `id`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '数据ID',
    `ip`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'IP地址',
    `country`     varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT '国家中文名称',
    `province`    varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT '中国省份中文名称',
    `address`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '详细地址',
    `isp`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '互联网服务提供商',
    `overseas`    tinyint(1)                                                    NULL DEFAULT NULL COMMENT '是否国外 true-是, false-否',
    `lat`         decimal(12, 8)                                                NULL DEFAULT NULL COMMENT '纬度',
    `lng`         decimal(12, 8)                                                NULL DEFAULT NULL COMMENT '经度',
    `is_deleted`  tinyint(1)                                                    NULL DEFAULT NULL COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time` datetime                                                      NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                      NULL DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    UNIQUE INDEX `ip_index` (`ip` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 81
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = 'IP查询记录'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of ip_query_info
-- ----------------------------

-- ----------------------------
-- Table structure for log_info
-- ----------------------------
DROP TABLE IF EXISTS `log_info`;
CREATE TABLE `log_info`
(
    `auto_id`     bigint                                                        NOT NULL AUTO_INCREMENT,
    `id`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '数据ID',
    `uri`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '访问uri',
    `access_time` datetime                                                      NULL DEFAULT NULL COMMENT '访问时间',
    `access_ip`   varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT '访问IP',
    `session_id`  varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT 'sessionId',
    `user_id`     varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT '用户ID',
    `reject`      tinyint(1)                                                    NULL DEFAULT NULL COMMENT '是否拒绝访问 true-是, false-否',
    `is_deleted`  tinyint(1)                                                    NULL DEFAULT NULL COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time` datetime                                                      NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                      NULL DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `uri_index` (`uri` ASC) USING BTREE,
    INDEX `access_time_index` (`access_time` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 8858
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '拦截器访问记录'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of log_info
-- ----------------------------

-- ----------------------------
-- Table structure for notebook
-- ----------------------------
DROP TABLE IF EXISTS `notebook`;
CREATE TABLE `notebook`
(
    `auto_id`             bigint                                                        NOT NULL AUTO_INCREMENT,
    `id`                  varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '数据ID',
    `user_id`             varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '用户ID',
    `record_date`         date                                                          NULL     DEFAULT NULL COMMENT '记录日期',
    `publish_wechat_flag` tinyint(1)                                                    NOT NULL DEFAULT 0 COMMENT '同步发表到微信公众号',
    `publish_title`       varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '发布标题',
    `record_type_dic`     int                                                           NULL     DEFAULT NULL COMMENT '日记类型',
    `content`             longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci     NULL COMMENT '内容',
    `publish_status`      tinyint(1)                                                    NOT NULL DEFAULT 0 COMMENT '微信发布状态(0-未发布, 1-发布中, 2-发布失败, 3-发布成功)',
    `publish_error_msg`   varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '微信发布错误信息',
    `publish_id`          varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '微信草稿发布ID',
    `article_id`          varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '微信文章ID(草稿发布成功时存在)',
    `is_deleted`          tinyint(1)                                                    NOT NULL DEFAULT 0 COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time`         datetime                                                      NULL     DEFAULT NULL COMMENT '创建时间',
    `update_time`         datetime                                                      NULL     DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `user_id_index` (`user_id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 23
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '日记表'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of notebook
-- ----------------------------

-- ----------------------------
-- Table structure for notebook_image
-- ----------------------------
DROP TABLE IF EXISTS `notebook_image`;
CREATE TABLE `notebook_image`
(
    `auto_id`     bigint                                                        NOT NULL AUTO_INCREMENT,
    `id`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '数据ID',
    `notebook_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '日记ID',
    `file_url`    varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '图片URL',
    `is_deleted`  tinyint(1)                                                    NOT NULL DEFAULT 0 COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time` datetime                                                      NULL     DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                      NULL     DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `notebook_id_index` (`notebook_id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 48
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '日记记录图片表'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of notebook_image
-- ----------------------------

-- ----------------------------
-- Table structure for notebook_share
-- ----------------------------
DROP TABLE IF EXISTS `notebook_share`;
CREATE TABLE `notebook_share`
(
    `auto_id`       bigint                                                       NOT NULL AUTO_INCREMENT,
    `id`            varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据ID',
    `notebook_id`   varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '日记记录ID',
    `share_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '共享用户ID',
    `is_deleted`    tinyint(1)                                                   NOT NULL DEFAULT 0 COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time`   datetime                                                     NULL     DEFAULT NULL COMMENT '创建时间',
    `update_time`   datetime                                                     NULL     DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `notebook_id_index` (`notebook_id` ASC) USING BTREE,
    INDEX `share_user_id_index` (`share_user_id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 17
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '日记记录共享用户表'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of notebook_share
-- ----------------------------

-- ----------------------------
-- Table structure for notice
-- ----------------------------
DROP TABLE IF EXISTS `notice`;
CREATE TABLE `notice`
(
    `auto_id`         bigint                                                       NOT NULL AUTO_INCREMENT,
    `id`              varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据ID',
    `send_time`       datetime                                                     NOT NULL COMMENT '发送时间',
    `receive_user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '接收用户ID',
    `read_flag`       tinyint(1)                                                   NOT NULL DEFAULT 0 COMMENT '阅读标记(0-否, 1-是)',
    `read_time`       datetime                                                     NULL     DEFAULT NULL COMMENT '阅读时间',
    `content`         longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci    NULL COMMENT '公告内容',
    `handle_flag`     tinyint(1)                                                   NOT NULL DEFAULT 0 COMMENT '处理标记(0-未处理, 1-用户处理, 2-系统处理)',
    `is_deleted`      tinyint(1)                                                   NULL     DEFAULT NULL COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time`     datetime                                                     NULL     DEFAULT NULL COMMENT '创建时间',
    `update_time`     datetime                                                     NULL     DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `receive_user_id_index` (`receive_user_id` ASC) USING BTREE,
    INDEX `read_flag_index` (`read_flag` ASC) USING BTREE,
    INDEX `handle_flag_index` (`handle_flag` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 1
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '系统公告'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of notice
-- ----------------------------

-- ----------------------------
-- Table structure for req_without_info
-- ----------------------------
DROP TABLE IF EXISTS `req_without_info`;
CREATE TABLE `req_without_info`
(
    `auto_id`     bigint                                                       NOT NULL AUTO_INCREMENT,
    `id`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据ID',
    `url`         longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci    NULL COMMENT '请求url',
    `req_header`  longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci    NULL,
    `req_body`    longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci    NULL COMMENT '请求对象',
    `req_time`    datetime                                                     NULL DEFAULT NULL COMMENT '请求时间',
    `resp_flag`   tinyint(1)                                                   NULL DEFAULT NULL COMMENT '响应标记(0-false, 1-true)',
    `resp_result` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci    NULL COMMENT '响应结果',
    `resp_time`   datetime                                                     NULL DEFAULT NULL COMMENT '响应时间',
    `is_deleted`  tinyint(1)                                                   NULL DEFAULT NULL COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time` datetime                                                     NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                     NULL DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 29
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '外部请求记录'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of req_without_info
-- ----------------------------

-- ----------------------------
-- Table structure for share_relation
-- ----------------------------
DROP TABLE IF EXISTS `share_relation`;
CREATE TABLE `share_relation`
(
    `auto_id`            bigint                                                       NOT NULL AUTO_INCREMENT,
    `id`                 varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据ID',
    `user_id`            varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
    `share_user_id`      varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '共享用户ID',
    `relation_dic_value` int                                                          NULL     DEFAULT NULL COMMENT '关系字典值',
    `is_deleted`         tinyint(1)                                                   NOT NULL DEFAULT 0 COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time`        datetime                                                     NULL     DEFAULT NULL COMMENT '创建时间',
    `update_time`        datetime                                                     NULL     DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `user_id_index` (`user_id` ASC) USING BTREE,
    INDEX `share_user_id_index` (`share_user_id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 5
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '共享关系绑定表'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of share_relation
-- ----------------------------

-- ----------------------------
-- Table structure for swiper_user
-- ----------------------------
DROP TABLE IF EXISTS `swiper_user`;
CREATE TABLE `swiper_user`
(
    `auto_id`     bigint                                                        NOT NULL AUTO_INCREMENT,
    `id`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '数据ID',
    `user_id`     varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL     DEFAULT NULL COMMENT '店铺ID',
    `url`         text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci         NULL COMMENT 'url地址',
    `remark`      varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '备注',
    `is_deleted`  tinyint(1)                                                    NOT NULL DEFAULT 0 COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time` datetime                                                      NULL     DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                      NULL     DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `user_id_index` (`user_id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 9
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '店铺首页轮播图'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of swiper_user
-- ----------------------------
INSERT INTO `swiper_user`
VALUES (1, '1759623407425654789', '-1', 'https://smile-jt.cn/minio/hair-salon-files/780.jpeg', NULL, 0,
        '2024-05-11 14:34:06', '2024-05-11 14:34:06');

-- ----------------------------
-- Table structure for sys_info
-- ----------------------------
DROP TABLE IF EXISTS `sys_info`;
CREATE TABLE `sys_info`
(
    `auto_id`     bigint                                                         NOT NULL AUTO_INCREMENT,
    `id`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci   NOT NULL COMMENT '数据ID',
    `sys_name`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT '系统名称',
    `sys_desc`    varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '系统描述',
    `developer`   varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci   NULL DEFAULT NULL COMMENT '开发者',
    `we_chat`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT '微信号',
    `qq`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT 'QQ',
    `github`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT 'GitHub地址',
    `web_url`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT '网址',
    `remark`      text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci          NULL COMMENT '备注',
    `is_deleted`  tinyint(1)                                                     NULL DEFAULT NULL COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time` datetime                                                       NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                       NULL DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 2
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '系统信息'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_info
-- ----------------------------
INSERT INTO `sys_info`
VALUES (1, '1866767525833977859', '铭铭日记本', '© 2024 紫苏', 'Smile-JT', 'long1083461179', '1083461179',
        'abandon_jt@163.com', 'http://smile-jt.cn', NULL, 0, '2024-12-17 09:46:29', '2024-12-17 09:46:29');

-- ----------------------------
-- Table structure for sys_not_permission
-- ----------------------------
DROP TABLE IF EXISTS `sys_not_permission`;
CREATE TABLE `sys_not_permission`
(
    `auto_id`     bigint                                                        NOT NULL AUTO_INCREMENT,
    `id`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '数据ID',
    `url_path`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '不需要鉴权的URL',
    `is_deleted`  tinyint(1)                                                    NULL DEFAULT NULL COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time` datetime                                                      NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                      NULL DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE,
    INDEX `url_path_index` (`url_path` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 4
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '不需要鉴权的URL'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_not_permission
-- ----------------------------
INSERT INTO `sys_not_permission`
VALUES (1, '1575037363729567745', '/api/user/registerUser', 0, '2022-09-28 16:19:05', '2022-09-28 16:19:05');
INSERT INTO `sys_not_permission`
VALUES (2, '1580489320594247682', '/api/auth/login', 0, '2022-10-13 17:23:13', '2022-10-13 17:23:13');
INSERT INTO `sys_not_permission`
VALUES (3, '1795363472836444160', '/api/user/checkLoginId', 0, '2024-11-27 14:33:09', '2024-11-27 14:33:09');

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user`
(
    `auto_id`         bigint                                                        NOT NULL AUTO_INCREMENT,
    `id`              varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '数据ID',
    `login_id`        varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '登陆ID',
    `nick_name`       varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL     DEFAULT NULL COMMENT '用户昵称',
    `password`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '密码',
    `avatar`          varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '头像',
    `gender`          tinyint(1)                                                    NULL     DEFAULT 0 COMMENT '性别(性别 0-未知, 1-男, 2-女)',
    `signature`       varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '个性签名',
    `status`          tinyint                                                       NULL     DEFAULT NULL COMMENT '状态(1-正常,2-冻结)',
    `user_type`       tinyint                                                       NULL     DEFAULT NULL COMMENT '用户类型: 1(管理员) 2(普通用户) 3(微信用户)',
    `is_show`         tinyint(1)                                                    NOT NULL DEFAULT 1 COMMENT '是否显示',
    `last_login_add`  varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL     DEFAULT NULL COMMENT '最后登录IP',
    `last_login_time` datetime                                                      NULL     DEFAULT NULL COMMENT '最后登录时间',
    `is_deleted`      tinyint(1)                                                    NOT NULL DEFAULT 0 COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time`     datetime                                                      NULL     DEFAULT NULL COMMENT '创建时间',
    `update_time`     datetime                                                      NULL     DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `login_id_index` (`login_id` ASC) USING BTREE,
    INDEX `nick_name_index` (`nick_name` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 6
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '系统用户'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user`
VALUES (1, '-1', 'unknown', '未知', NULL, 'https://smile-jt.cn/minio/micro-files/default.png', 0, NULL, 2, 1,
        0, '110.191.179.185', '2025-01-14 10:41:03', 0, '2022-09-22 11:37:05', '2025-01-14 10:41:03');
INSERT INTO `sys_user`
VALUES (2, '-2', 'system', '系统', NULL, 'https://smile-jt.cn/minio/micro-files/default.png', 2,
        '1083461179@qq.com', 2, 1, 0, '127.0.0.1', '2022-09-22 11:37:05', 0, '2022-09-22 11:37:05',
        '2023-11-21 14:20:20');
INSERT INTO `sys_user`
VALUES (3, '1866366975339446274', 'tourist', '游客用户',
        'BtsgFfHsAzb/h+c7PoWjkmeFDfG2jKTvDpALfd3Zg3VMVz6hpcpOwxYEeUOGCbLC',
        'https://smile-jt.cn/minio/micro-files/default.png', 0, '游客用户,数据每天自动恢复', 1, 2, 1, '117.188.202.139',
        '2025-01-10 23:24:05', 0, '2024-12-10 14:18:57', '2025-01-14 00:00:00');
INSERT INTO `sys_user`
VALUES (4, '1866767525833977858', 'smile', '紫苏', '/N2ZzFoG3F8tjVMi0RDT6jfLHU0AEjAYI0hk87r0POdfYL8jLoTHEzQSchmRXQIh',
        'https://smile-jt.cn/minio/notebook-files/2024/12/11/4eaa2db0-773a-4238-9a35-8776086bcea8.jpg', 1,
        '一半烟火以谋生，一半诗意以谋爱。', 1, 2, 1, '110.191.179.185', '2025-01-14 10:41:12', 0, '2024-12-11 16:50:36',
        '2025-01-14 10:41:12');
INSERT INTO `sys_user`
VALUES (5, '1868589276478881793', 'moon', '泡泡', 'JoUAHxhObNiCJ3x+98utqHSzx5FZubj8piTJPlkatYzCoFdK/vZbcqIUaGYnPIrx',
        'https://smile-jt.cn/minio/notebook-files/2024/12/16/c9ccf2e1-468a-45da-99ba-117dc5daecb3.jpg', 2,
        '从此烟雨落蓉城，一人撑伞两人行', 1, 2, 1, '110.191.179.185', '2024-12-25 16:10:05', 0, '2024-12-16 17:29:35',
        '2024-12-25 16:10:05');

-- ----------------------------
-- Table structure for wechat_develop_config
-- ----------------------------
DROP TABLE IF EXISTS `wechat_develop_config`;
CREATE TABLE `wechat_develop_config`
(
    `auto_id`     bigint                                                        NOT NULL AUTO_INCREMENT,
    `id`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '数据ID',
    `user_id`     varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL     DEFAULT NULL COMMENT '用户ID',
    `enable_flag` tinyint(1)                                                    NOT NULL DEFAULT 0 COMMENT '启用标记',
    `app_id`      varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL     DEFAULT NULL COMMENT '公众号AppID',
    `app_secret`  varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '公众号AppSecret',
    `is_deleted`  tinyint(1)                                                    NOT NULL DEFAULT 0 COMMENT '逻辑删除：1(已删除) 0(未删除)',
    `create_time` datetime                                                      NULL     DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime                                                      NULL     DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`auto_id`) USING BTREE,
    UNIQUE INDEX `id_index` (`id` ASC) USING BTREE,
    INDEX `user_id_index` (`user_id` ASC) USING BTREE,
    INDEX `enable_flag_index` (`enable_flag` ASC) USING BTREE,
    INDEX `app_id_index` (`app_id` ASC) USING BTREE,
    INDEX `is_deleted_index` (`is_deleted` ASC) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 3
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '用户微信公众号配置'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of wechat_develop_config
-- ----------------------------
INSERT INTO `wechat_develop_config`
VALUES (1, '1872516495962062849', '1866767525833977858', 1, 'wxb3cf064721a0b37f',
        'y/8KXAWMEpw1HZexHe4nnDfEdqp+9ZKZPh/DVYNdCUNzbp4MkG6jvWum+VjPkWnu', 0, '2024-12-27 13:34:57',
        '2024-12-27 15:34:33');
INSERT INTO `wechat_develop_config`
VALUES (2, '1872516495962062850', '1868589276478881793', 1, 'wxb3cf064721a0b37f',
        'y/8KXAWMEpw1HZexHe4nnDfEdqp+9ZKZPh/DVYNdCUNzbp4MkG6jvWum+VjPkWnu', 0, '2024-12-27 13:34:57',
        '2024-12-27 13:34:57');
-- ------------------------> 正式结束写 SQL 语句 <------------------------
##提交事务
COMMIT;

## 如遇错误, 执行以下sql
## ROLLBACK;